<%--
  Created by IntelliJ IDEA.
  User: KaiFaBu010
  Date: 2017-12-21
  Time: 18:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <jsp:include page="/WEB-INF/jsp/head.jsp">
        <jsp:param value="新增特殊交易" name="pageTitle"/>
    </jsp:include>
    <script src="/js/common.js"></script>
</head>
<body>
<div class="easyui-panel" title="新增特殊交易" data-options="iconCls:'icon-add',fit:true,border:false">
    <div>
        <a href="/specialDeal/home" id="lbtnBack" class="easyui-linkbutton"><i class="fa fa-backward"></i>&nbsp;返回</a>
    </div>
    <form id="newSDealTb" action="/specialDeal/insetSpecialDeal" method="post">
        <table class="yj-table" cellpadding="0" cellspacing="0">
            <tr>
                <td style="width:100px;">银行卡别名:</td>
                <td>
                    <div id="Bank">
                        <select id="bid" class="yj-select bid" name="bid" data-value=""></select>
                        <span class="msg-box" for="bid" style="position:absolute;"></span>
                    </div>
                </td>

            </tr>
            <tr>
                <td>特殊支出的金额:</td>
                <td>
                    <input class="easyui-numberbox yj-text" type="text" id="specialexpend" groupSeparator="," data-options="min:0,precision:2,required:true"
                           style="text-align:right" name="specialexpend"/>
                </td>

            </tr>
            <tr>
                <td>特殊支出的类型:</td>
                <td>
                    <select class="easyui-combobox yj-select" type="text" id="setype"  name="setype">
                        <option value="">请选择</option>
                        <option value="0">内部提现</option>
                        <option value="1">工作室费用</option>
                        <option value="2">Q币提取</option>
                    </select>

                </td>
            </tr>
            <tr>
                <td>操作者</td>
                <td>
                    <input class="yj-text" type="text" id="handlers" name="handlers" style="width: 80px;"
                           value="${userRName}" readonly="readonly"/>
                    <input  type="hidden" id="handlerid" name="handlerid"
                           value="${userID}" />
                </td>
                <td><strong>备注：</strong></td>
                <td>
                     <textarea class="yj-textarea" id="remark" name="remark" data-toggle="autoheight"
                               cols="90" rows="6" maxlength="300" style="width:350px;height:180px;"
                               placeholder="字数控制在300字以内"></textarea>
                </td>
            </tr>
        </table>
        <div style="margin-top:15px;padding-bottom: 15px;">
            <button id="btnAdd" type="submit" class="easyui-linkbutton"><i class="fa fa-save"></i>&nbsp;保存</button>
            <a href="/specialDeal/home" id="lbtnoff" class="easyui-linkbutton"><i class="fa fa-backward"></i>&nbsp;取消</a>
        </div>
    </form>
</div>
<script>

    //银行卡下拉框
    $('#Bank').cxSelect({
            url: '/bank/getAll',
            selects: ['bid'],
            emptyStyle: 'none',
            jsonName: 'alias',
            jsonValue: 'bid'
        }
    );




    $("#newSDealTb").validator({
        theme: "yellow_right",
        fields: {
            bid: {
                rule: "required;"
            },
            specialexpend: {
                rule: "required;"
            },
            setype: {
                rule: "required;"
            },
            handlers: {
                rule: "required;"
            },
            handlerid: {
                rule: "required;"
            }

        }, valid: function (form) {
            $(form).form('submit', {
                success: function (data) {
                    console.log(data);
                    var newdata =JSON.parse(data);
                    $.messager.alert('提示信息', newdata['msg'], 'info', function () {
                        //跳转地址
                        location.href = "/specialDeal/home";
                    });
                    $('.panel-tool-close').hide();//隐藏关闭按钮
                }
            });
        }
    });



</script>

</body>
</html>
